// 频道请求模块
import request from '@/utils/request'
/*
获取用户频道列表
*/ 

export const getChannels = () => {
    return request({
        url: '/v1_0/user/channels',
        method: 'GET',
    })
}
/*
获取所有频道列表
*/ 
export const getAllChannels =()=>{
    return request({
        url: '/v1_0/channels',
        method: 'GET',
    })
}
/*
添加用户频道
*/ 
export const addUserChannel =(channel)=>{
    return request({
        url: '/v1_0/user/channels',
        method: 'PATCH',
        data:{
            channels:[channel]
        }
    })
}

/*
删除指定用户频道
*/ 
export const deleteUserChannel =(channelId)=>{
    return request({
        url: '/v1_0/user/channels/${channelId}',
        method: 'DELETE',
    })
}